<div class="page-register">
  <article class="header">
    <header>
      <a href="/" class="site-logo">foogooo</a>
      <div class="login">
        <em class="bold">已有账户？</em>
        <a href="/login/login">
          <el-button type="primary" size="small">登录</el-button>
        </a>
      </div>
    </header>
  </article>
  <section>
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
      <el-form-item label="昵称" prop="name">
        <el-input v-model="ruleForm.name"></el-input>
      </el-form-item>
      <el-form-item label="邮箱" prop="email">
        <el-input v-model="ruleForm.email"></el-input>
        <el-button round @click="sendMsg">发送验证码</el-button>
        <span class="status">{{statusMsg}}</span>
      </el-form-item>
      <el-form-item label="验证码" prop="code">
        <el-input v-model="ruleForm.code" maxlength="4"></el-input>
      </el-form-item>
      <el-form-item label="密码" prop="pwd">
        <el-input v-model="ruleForm.pwd" type="password"></el-input>
      </el-form-item>
      <el-form-item label="确认密码" prop="cpwd">
        <el-input v-model="ruleForm.cpwd" type="password"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="register">同意以下协议并注册</el-button>
        <div class="error">{{error}}</div>
      </el-form-item>
    </el-form>
  </section>
</div>